package com.xt.wikiperfumapi.util;

import org.springframework.stereotype.Component;

import java.util.Random;

@Component
public class RandomUtil {

    private static Random random = new Random();


    // 生成一个在start和end之间的随机数，返回值为小数类型
    public double generateRandomNumber(double start, double end) {
        // 返回一个start到end之间的随机浮点数
        return start + (end - start) * random.nextDouble();
    }
}
